#!/usr/bin/env node

const fs = require('fs');
//import {fs} from 'fs'
const file = process.argv[2];

//size
let len = fs.statSync(file).size;
//create Buffer
let buf  = Buffer.alloc(len);

//open -> handle
let fid = fs.openSync(file,'r');

//read
fs.readSync(fid,buf,0,len,0);
console.log(buf.toString('utf8'));
//close
fs.closeSync(fid);


